<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<script>
			/* 
				for in 可以遍历对象自身的和继承的可枚举的属性
			*/
			/* 
				1.直接在class中写属性赋值的操作,相当于这些属性是实例对象身上的属性,而不是原型对象上的
				例如:   number = 12; getNumber = () => {};
				2.class原型对象的属性都是不可遍历的    {
												"writable": true,
												"enumerable": false,
												"configurable": true
												}
			*/
			class Father {
				constructor(name, age) {
					this.name = name
					this.age = age
				}
				number = 12
				getAge() {
					return this.age
				}
			}
			Father.prototype.expand = () => {}
			class Child extends Father {
				constructor(name, age) {
					super(name, age)
				}
			}
			const obj = new Child('zs', 18)
			for (const key in obj) {
				console.log(key)
			}
			// number
			// name
			// age
			// expand
		</script>
	</head>

	<body></body>
</html>
